// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
//import Vue from 'vue';
import App from './App';
// 路由
import router from './router';
// 状态管理
import store from '@/store/index.js';
// 动态改变路由到状态管理
import { sync } from 'vuex-router-sync';
// ajax请求
import 'common/js/axios.js';
// 引入jQuery
import 'static/jquery/jquery.min.js';
// iView UI框架
// iView 样式与主题
//import iView from 'iview';
import 'common/less/iview-theme.less';
// Mcake工具集
import '@/frame/Mcake/Mcake.js';

// 引入element-ui 组件
//import { Table, TableColumn, Button, Pagination, Carousel, CarouselItem, Loading, Icon, Scrollbar, Radio, RadioGroup, Checkbox, CheckboxGroup, Upload } from 'element-ui';
//import Elementui from "element-ui";

// 初始化路由状态
sync(store, router);
//注册iView 组件
//Vue.use(iView);
//Vue.use(Elementui);
// 注册组件
Vue.config.productionTip = false;

// 注册element-ui 组件
// Vue.use(Table);
// Vue.use(TableColumn);
// Vue.use(Pagination);
// Vue.use(Button);
// Vue.use(Carousel);
// Vue.use(CarouselItem);
// Vue.use(Loading);
// Vue.use(Icon);
// Vue.use(Scrollbar);
// Vue.use(Radio);
// Vue.use(RadioGroup);
// Vue.use(Checkbox);
// Vue.use(CheckboxGroup);
// Vue.use(Upload);
// 创建应用
let vm = new Vue({
    el: '#app',
    router,
    store,
    template: '<App/>',
    components: { App }
})

// const renderer = require('vue-server-renderer').createRenderer()

// renderer.renderToString(app, (err, html) => {
//     if (err) throw err
//     console.log(html)
//         // => <div data-server-rendered="true">Hello World</div>
// })